/**
 * 		Role.java
 *  Adrián E. Córdoba 		04/05/2014
 */
package ar.com.adriancordoba.app.enterprise.rosc.model.entities;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author Adrián E. Córdoba
 */
public class Role implements Serializable {
	private String name;
	private List<Permission> permissionsList;

	private static final long serialVersionUID = 1L;

	/**
	 * @param name
	 * @param permissionsList
	 */
	public Role(String name, List<Permission> permissionsList) {
		this.name = name;
		this.permissionsList = permissionsList;
	}

	/**
	 * 
	 */
	public Role() {
		permissionsList = new ArrayList<Permission>();
	}

	public void addPermission(Permission permission) {
		permissionsList.add(permission);
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the permissionsList
	 */
	public List<Permission> getPermissionsList() {
		return permissionsList;
	}

	/**
	 * @param permissionsList the permissionsList to set
	 */
	public void setPermissionsList(List<Permission> permissionsList) {
		this.permissionsList = permissionsList;
	}
}
